home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4256 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  788 b 

  1. Path: happy.firstnethou.com!usenet
  2. From: master@firstnethou.com (Randy Brewer)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Calculation in C: HELP
  5. Date: Fri, 02 Feb 1996 22:29:34 GMT
  6. Organization: FirstNet
  7. Message-ID: <4eu30t$4l0@happy.firstnethou.com>
  8. References: <4eddjd$mde@newsbf02.news.aol.com>
  9. NNTP-Posting-Host: ppp032.firstnethou.com
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. queenhead@aol.com (Queenhead) wrote:
  13.  
  14. >Hi. I am trying to use the following calculation in a program and it is
  15. >not coming out right:
  16.  
  17. >nextyr  = rate  *  currentyr  *  ( 1 - (currentyr/1000000)
  18.  
  19. >Is something wrong with that (in terms of C syntax)?  I should be getting
  20. >234,000   if rate is 2.6 and currentyr is 100,000. My program is not
  21. >giving me that.
  22.  
  23. >Thanks.
  24.  
  25. Be sure that your data type is atleast LONG.
  26.  
  27.